package com.mobi.Survey.lib.model;

import android.view.View;

/**
 * 
 * <b>Author:</b> Yahya Arshad
 * <p>
 * <b>Company:</b> Mobi Media Soft
 * <p>
 * <b> Website:</b> www.mobimediasoft.com
 * <p>
 * Singleton.java Responsible for communication between screens to carry
 * information all resources saved in this class must be explicitly released
 */
public class Singleton
{
	/**
	 * release resources
	 */
	public static void release()
	{
		if (singleTon != null)
		{
			singleTon.videoView = null;

			singleTon = null;
		}
	}

	/**
	 * returns activy video view
	 * 
	 * @return
	 */
	public View getVideoView()
	{
		return videoView;
	}

	// public boolean refreshList = false;
	/**
	 * Used for communicating Bitmap in two activities. must recycled and assign
	 * null once is done
	 */

	public void setVideoView(View videoView)
	{
		this.videoView = videoView;
	}

	private static Singleton singleTon;

	private View videoView;

	private Singleton()
	{

	}

	/**
	 * 
	 * @return Singleton instance
	 */
	public static final Singleton getInstance()
	{

		return (singleTon == null) ? singleTon = new Singleton() : singleTon;
	}

}
